/**
 * Created by novem on 2015/10/20.
 */
window.onload=function(){
    var shopId = $.getUrlParam("shopId");
    var url = getUrl();
    $.jsonp({
        url: 'http://'+url+'/api/supplier/shop_detail_list-'+shopId,
        data: {},
        callbackParameter: "callback",
        success: function (data, textStatus, xOptions) {
            data.shops.distance = $.getUrlParam("distance");
            $(".bacim").attr('style','background-image:url('+data.shops.cover+')');
            var telphone = data.shops.telphone;
            var address = data.shops.address;
            $("#tel").text(telphone)
            $("#telphone").attr("href","tel:"+data.shops.telphone);
            $("#address").text(address);
            var complied_tpl = juicer($("#jd_detail_tpl").text());
            var html = complied_tpl.render(data);
            $(".order-list").append(html);
            var complied_tpl01 = juicer($("#jd_detail_tpl01").text());
            var html01 = complied_tpl01.render(data);
            $("#store01").append(html01);
        },
        error: function (xOptions, textStatus) {
        }
    });
}